<template>
  <el-row class="tac">
    <el-col :span="4">
      <el-menu
        default-active="1"
        class="el-menu-vertical-demo"
        @open="handleOpen"
        @close="handleClose"
      >
        <el-menu-item index="1">
          <el-icon><location /></el-icon>
          <span>
            <router-link to="/menu/banner">轮播图管理</router-link>
          </span>
        </el-menu-item>
        <el-menu-item index="2">
          <el-icon><icon-menu /></el-icon>
          <span> <router-link to="/menu/type">类别管理</router-link> </span>
        </el-menu-item>
        <el-menu-item index="3">
          <el-icon><document /></el-icon>
          <span> <router-link to="/menu/goods">商品管理</router-link> </span>
        </el-menu-item>
        <el-menu-item index="4">
          <el-icon><document /></el-icon>
          <span> <router-link to="/menu/signature">签名功能</router-link> </span>
        </el-menu-item>
        <el-menu-item index="5">
          <el-icon><document /></el-icon>
          <span> <router-link to="/menu/map">{{ t("map") }}</router-link> </span>
        </el-menu-item>
        <el-menu-item index="6">
          <el-icon><document /></el-icon>
          <span> <router-link to="/menu/zhibo">{{ t('zhibo') }}</router-link> </span>
        </el-menu-item>
        <el-menu-item index="7">
          <el-icon><document /></el-icon>
          <span> <router-link to="/menu/test">{{ t('test') }}</router-link> </span>
        </el-menu-item>
      </el-menu>
      
    </el-col>
    <el-col :span="20">
      <RouterView></RouterView>
    </el-col>
  </el-row>
</template>

<script lang="ts" setup>
import { Document, Menu as IconMenu, Location, Setting } from '@element-plus/icons-vue'
import { RouterView, RouterLink } from 'vue-router'
import { useI18n } from "vue-i18n";
const { t } = useI18n();

const handleOpen = (key: string, keyPath: string[]) => {
  console.log(key, keyPath)
}
const handleClose = (key: string, keyPath: string[]) => {
  console.log(key, keyPath)
}
</script>
